import { request } from "./request";

export function getDetail(iid) {
  return request({
    url: '/detail',
    params: {
      iid
    }
  })
}

export function getRecommend() {
  return request({
    url: '/recommend',

  })

}
export class Goods {
  constructor(itemInfo, columns, services) {
    this.title = itemInfo.title
    this.desc = itemInfo.desc,
      this.oldPrice = itemInfo.oldPrice,
      this.price = itemInfo.price,
      this.discountBgColor = itemInfo.discountBgColor,
      this.discountDesc = itemInfo.discountDesc,
      this.columns = columns
    this.services = services
    this.realPrice = itemInfo.lowNowPrice

  }
}
export class Shop {
  constructor(shopInfo) {
    this.logo = shopInfo.shopLogo
    this.cFans = shopInfo.cFans
    this.cGoods = shopInfo.cGoods
    this.name = shopInfo.name
    this.cSells = shopInfo.cSells
    this.score = shopInfo.score
  }
}
export class GoodsParams {
  constructor(info, rule) {
    this.image = info.images ? info.images[0] : ''
    this.set = info.set
    this.tables = rule.tables

  }
}